<template>
	<u-list @scrolltolower="onHitBottom">
		<u-list-item v-for="(item, index) in list" :key="index">
			<slot name="index"></slot>
		</u-list-item>
	</u-list>
</template>

<script>
	export default {
		name:"ycy-page-list",
		data() {
			return {
				pageNum: 1
			};
		},
		methods: {
			onItemClick(item, index) {
				this.$emit('onItemClick', { item, index});
			},
			onHitBottom() {
				this.pageNum++;
				this.$emit('onPageNext',this.pageNum)
			}
		}
	}
</script>

<style lang="scss">

</style>